<style>
	.bm_table td {padding:3px}
	.bm_table td.nowrap {white-space:nowrap}
</style>

<table class="bm_table" border="1" cellspacing="0">
	<tr>
		<th>Name</th>
		<th>Time delta (ms)</th>
		<th>Memory delta(b)</th>
		<th>Time total (ms)</th>
		<th>Memory total(b)</th>
	</tr>
	<?
		foreach($mvc->bm->points as $k => $line)
		{
			echo '<tr style="background:'.$line['mark'];
			if (($line['timedelta'] < 0.001) && ($line['memdelta'] < 1000) ) echo '; color:#aaa';
			echo '">';
			echo '<td>'.$line['name'].'</td>';
			
			echo '<td';
				if ($line['timedelta'] > 0.001) echo ' style="background:#faa"';
			echo ' class="nowrap">'.number_format($line['timedelta']*1000, 2).'</td>';

			echo '<td align="right"';
				if ($line['memdelta'] > 1000) echo ' style="background:#faa"';
			echo ' class="nowrap">'.number_format($line['memdelta'], 0, '', ' ').'</td>';

			echo '<td align="right" class="nowrap">'.number_format($line['timetotal']*1000, 2).'</td>';
			echo '<td align="right" class="nowrap">'.number_format($line['memtotal'], 0, '', ' ').'</td>';
			echo '</tr>';
		}
	?>
</table>